home *** CD-ROM | disk | FTP | other *** search
Makefile | 1994-06-05 | 3.5 KB | 137 lines |
- ######################################################################
- #
- # WARNING:
- #
- # * if fchart sources are not in the gnuplot directory, define
- # following variable as a path to it:
-
- GNUP=../gnuplot
-
- # (default is as you see)
- # Name this file 'Makefile' and just use 'make ...'
- #
- # * if fchart is in the gnuplot directory, define
- #
- # GNUP=.
- #
- # and use 'make -f <this_file> ...'
- # since this file requires presence of the original Makefile
- #
- ######################################################################
-
- # where to install executable and help on 'make install'
- DEST=/usr/local/bin/fchart
- HELPDEST=/usr/local/lib/fchart.gih
-
- ######################################################################
-
- # substitute your troff command (and any flags) for this one
- TROFF=itroff
-
- # -DFORK if you have vfork()
- # -DBCOPY if your memcpy() is called bcopy() (a Berkeleyism, right?)
- # -DNOCOPY if you don't have a memcpy() by any name
- # -DGAMMA if you've got gamma(3)
- # -O if you trust your compiler's optimizer
- # -g if you don't trust me
- CFLAGS = -I$(GNUP) -DVFORK -DBCOPY -DGAMMA -O #-g
-
- OBJS = fcmd.o fgraf.o fmisc.o fchart.o futil.o font.o flblarr.o
- OBJG = $(GNUP)/term.o $(GNUP)/help.o $(GNUP)/scanner.o
-
- CSRC = fcmd.c fgraf.c fmisc.c fchart.c futil.c font.c flblarr.c
- OSRC = fstyles.i fchart.h README.ins Makefile fversion.c
- DSRC = fchart.doc titlepage.ms titlepage.tex
-
- # -lplot if you have -DUNIXPLOT in gnuplot Makefile
- LIBS = -lm -lplot
-
- fchart: $(OBJG) $(OBJS) fversion.o
- cc $(CFLAGS) $(OBJG) $(OBJS) fversion.o $(LIBS) -o fchart
-
- all: install
-
- #copying requires setting TO variable and copies from cwd
- copy:
- cp $(CSRC) $(TO)
- cp $(OSRC) $(TO)
- cp $(DSRC) $(TO)
-
- doc: gih hlp tex nroff
-
- install: fchart install-unix
- cp fchart $(DEST)
- strip $(DEST)
-
- $(OBJS) $(OBJG): $(GNUP)/plot.h
-
- $(OBJS): fchart.h
-
- fcmd.o fmisc.o $(GNUP)/help.o: $(GNUP)/help.h
-
- fgraf.o: fstyles.i
-
- fcmd.o:
- cc $(CFLAGS) -c fcmd.c -DHELPFILE=\"$(HELPDEST)\"
-
- $(GNUP)/help.o:
- ( cd $(GNUP) ; make help.o )
-
- $(GNUP)/scanner.o:
- ( cd $(GNUP) ; make scanner.o )
-
- $(GNUP)/term.o:
- ( cd $(GNUP) ; make term.o )
-
- clean:
- rm -f *.o fchart fchart.gih fchart.toc fchart.tex fchart.nroff
- rm -f fchart.aux fchart.log fchart.dvi fchart.hlp fchart.ms *~
-
- ### [tn]roff documentation
- troff: fchart.ms titlepage.ms
- tbl fchart.ms | eqn | $(TROFF) -ms
-
- # for screen viewing, or printers with backspace/overstrike, remove the -Tlpr
- nroff fchart.nroff: fchart.ms titlepage.ms
- tbl fchart.ms | neqn | nroff -ms -Tlpr > fchart.nroff
-
- ms fchart.ms: $(GNUP)/docs/doc2ms fchart.doc
- $(GNUP)/docs/doc2ms < fchart.doc > fchart.ms
-
- $(GNUP)/docs/doc2ms:
- ( cd $(GNUP)/docs ; make doc2ms )
-
- ### LaTeX documentation
- tex fchart.tex: $(GNUP)/docs/doc2tex fchart.doc
- $(GNUP)/docs/doc2tex < fchart.doc > fchart.tex
-
- dvi fchart.dvi: fchart.tex titlepage.tex
- ( latex fchart.tex ; latex fchart.tex )
-
- $(GNUP)/docs/doc2tex:
- ( cd $(GNUP)/docs ; make doc2tex )
-
- ### this is how to make fchart.hlp
- hlp fchart.hlp: $(GNUP)/docs/doc2hlp fchart.doc
- $(GNUP)/docs/doc2hlp < fchart.doc > fchart.hlp
-
- $(GNUP)/docs/doc2hlp:
- ( cd $(GNUP)/docs ; make doc2hlp )
-
- ### this is how to make fchart.gih
- gih fchart.gih: $(GNUP)/docs/doc2gih fchart.doc
- $(GNUP)/docs/doc2gih < fchart.doc > fchart.gih
-
- $(GNUP)/docs/doc2gih:
- ( cd $(GNUP)/docs ; make doc2gih )
-
- ### For Unix and MSDOS only
- install-unix: fchart.gih
- cp fchart.gih $(HELPDEST)
-
- ### for VMS only
- install-vms: fchart.hlp
- cp fchart.hlp $(HELPDEST)
-
-
-